<?php

namespace App\Modules\Admin\Http\Controllers\Expenses;

use App\Modules\Admin\Http\Controllers\BaseController;
use App\Modules\Admin\Http\Requests\Expenses\PropertyRequest;
use App\Modules\Admin\Services\Expenses\PropertyService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class PropertyLogController extends BaseController
{
    public function __construct(PropertyService $service)
    {
        $this->service = $service;
    }

    public function create(PropertyRequest $request): JsonResponse
    {
        return $this->createService($request);
    }

    public function update(PropertyRequest $request): JsonResponse
    {
        return $this->updateService($request);
    }
    public function getSelectlists(Request $request): JsonResponse
    {
        $result = $this->service->getSelectlists($request);
        return $this->successJson($result, $this->service->getError());
    }
    public function getDetail(Request $request): JsonResponse
    {
        $result = $this->service->getSelectDetail($request->all());
        return $this->successJson($result, $this->service->getError());
    }
}
